import {CloseCircleOutlined} from '@ant-design/icons';
import {
  Button,
  Card,
  Checkbox,
  Col,
  DatePicker,
  Divider,
  Form,
  Input,
  InputNumber,
  Popover,
  Radio,
  Row,
  Select
} from 'antd';
import React, {useEffect, useState} from 'react';
import {FooterToolbar} from '@ant-design/pro-layout';
import styles from './style.less';
import {queryCustomer} from '@/services/customer';
import {queryProduct} from '@/services/product';
import {queryAccount} from '@/services/system';
import moment from "moment";


const mockData = [
  {
    productionNo: 'PRO0001',
    processName: '开料',
    processType: '主工艺',
  },
  {
    processName: '图形电镀',
    processType: '主工艺',
    productionNo: 'PRO0002',
  },
  {
    processName: '喷锡',
    processType: '主工艺',
    productionNo: 'PRO0003',
  },
  {
    processName: '成形',
    processType: '主工艺',
    productionNo: 'PRO0004',
  },
  {
    processName: '测试',
    processType: '主工艺',
    productionNo: 'PRO0005',
  },
  {
    processName: 'FQC',
    processType: '主工艺',
    productionNo: 'PRO0006',
  },
  {
    processName: '检测',
    processType: '检测工艺',
    productionNo: 'PRO0007',
  },
  {
    processName: '入库',
    processType: '其他',
    productionNo: 'PRO0008',
  },
  {
    processName: '内层线路',
    processType: '主工艺',
    productionNo: 'PRO0009',
  },
  {
    processName: '内层检验',
    processType: '检测工艺',
    productionNo: 'PRO0010',
  },
  {
    processName: '层压',
    processType: '其他',
    productionNo: 'PRO0011',
  },
  {
    processName: '沉铜板电',
    processType: '其他',
    productionNo: 'PRO0012',
  }
]

const originTargetKeys = mockData.filter(item => +item.productionNo % 3 > 1).map(item => item.productionNo);


const {Option} = Select;
const {RangePicker} = DatePicker;
const fieldLabels = {
  productType: {
    label: '是否为新产品',
    code: 'productType',
  },
  orderCode: {
    label: '订单编码',
    code: 'orderCode'
  },
  productCode: {
    label: '产品编码',
    code: 'productCode',
  },
  productName: {
    label: '产品名称',
    code: 'productName',
  },
  productionNo: {
    label: '生产编号',
    code: 'productionNo',
  },
  custModelNo: {
    label: '客户型号',
    code: 'custModelNo',
  },
  orderNum: {
    label: '订货数量(pcs)',
    code: 'orderNum',
  },
  orderPrice: {
    label: '订单金额(元)',
    code: 'orderPrice',
  },
  requirementDeliveryTime: {
    label: '要求交货时间',
    code: 'requirementDeliveryTime',
  },
  planDeliveryTime: {
    label: '预计交货时间',
    code: 'planDeliveryTime',
  },
  receivedBy: {
    label: '接单人',
    code: 'receivedBy',
  },
  receivedTime: {
    label: '接单时间',
    code: 'receivedTime',
  },
  custId: {
    label: '客户名称',
    code: 'custId',
  },
  custAddress: {
    label: '客户地址',
    code: 'custAddress',
  },
  custContactName: {
    label: '客户联系人名称',
    code: 'custContactName',
  },
  custContactPhone: {
    label: '客户联系人电话',
    code: 'custContactPhone',
  },
  custContactEmail: {
    label: '客户联系人邮箱',
    code: 'custContactEmail',
  },
  remark: {
    label: '备注',
    code: 'remark',
  },

  contractNo: {
    label: '合同号',
    code: 'contractNo',
    labelId: 2,
    groupId: 2,
    groupName: '指示要求'
  },
  contractProductCode: {
    label: '产品编号',
    code: 'productCode',
    labelId: 4,
    groupId: 2,
    groupName: '指示要求'
  },
  contractClientType: {
    label: '客户型号',
    code: 'custModelNo',
    labelId: 6,
    groupId: 2,
    groupName: '指示要求'
  },
  pcbLayerNum: {
    label: 'PCB层数',
    code: 'pcbLayerNum',
    labelId: 8,
    groupId: 2,
    groupName: '指示要求'
  },
  unitSize: {
    label: '单元尺寸',
    code: 'unitSize',
    labelId: 10,
    groupId: 2,
    groupName: '指示要求'
  },
  panelWidth: {
    label: '拼版宽度(mm)',
    code: 'panelWidth',
    labelId: 12,
    groupId: 2,
    groupName: '指示要求'
  },
  panelLength: {
    label: '拼版长度(mm)',
    code: 'panelLength',
    labelId: 14,
    groupId: 2,
    groupName: '指示要求'
  },
  panelPcbNum: {
    label: '拼板PCB数',
    code: 'panelPcbNum',
    labelId: 16,
    groupId: 2,
    groupName: '指示要求'
  },
  pnlSetNum: {
    label: 'PNL上SET数',
    code: 'pnlSetNum',
    labelId: 17,
    groupId: 2,
    groupName: '指示要求'
  },
  // orderNum: {
  //   label: '订货数量(PCS)',
  //   code: 'orderNum',
  //   labelId: 18,
  //   groupId: 2,
  //   groupName: '指示要求'
  // },
  orderType: {
    label: '订单类型',
    code: 'orderType',
    labelId: 20,
    groupId: 2,
    groupName: '指示要求'
  },
  pcbType: {
    label: '板材类型',
    code: 'pcbType',
    labelId: 22,
    groupId: 2,
    groupName: '指示要求'
  },
  boardSupplier: {
    label: '板材厂商',
    code: 'boardSupplier',
    labelId: 24,
    groupId: 2,
    groupName: '指示要求'
  },
  otherBoardSupplier: {
    label: '其他板材厂商',
    code: 'otherBoardSupplier',
    labelId: 26,
    groupId: 2,
    groupName: '指示要求'
  },
  boardColor: {
    label: '板材颜色',
    code: 'boardColor',
    labelId: 28,
    groupId: 2,
    groupName: '指示要求'
  },
  boardMaterialType: {
    label: '板材类型',
    code: 'boardMaterialType',
    labelId: 30,
    groupId: 2,
    groupName: '指示要求'
  },
  redCopper: {
    label: '红色铜芯',
    code: 'redCopper',
    labelId: 32,
    groupId: 2,
    groupName: '指示要求'
  },
  highFrequencyBoard: {
    label: '高频板料',
    code: 'highFrequencyBoard',
    labelId: 34,
    groupId: 2,
    groupName: '指示要求'
  },
  dielectricConstant: {
    label: '介电常数',
    code: 'dielectricConstant',
    labelId: 36,
    groupId: 2,
    groupName: '指示要求'
  },
  boardThicknessInner: {
    label: '芯板内层厚度(mm)',
    code: 'boardThicknessInner',
    labelId: 38,
    groupId: 2,
    groupName: '指示要求'
  },
  boardThicknessOuter: {
    label: '芯板外层(单双面)厚度(mm)',
    code: 'boardThicknessOuter',
    labelId: 40,
    groupId: 2,
    groupName: '指示要求'
  },
  copperThicknessInner: {
    label: '铜箔内层厚度(oz)',
    code: 'copperThicknessInner',
    labelId: 42,
    groupId: 2,
    groupName: '指示要求'
  },
  copperThicknessOuter: {
    label: '铜箔外层厚度(oz)',
    code: 'copperThicknessOuter',
    labelId: 44,
    groupId: 2,
    groupName: '指示要求'
  },
  yaheThickness: {
    label: '压合总厚度公差',
    code: 'yaheThickness',
    labelId: 46,
    groupId: 2,
    groupName: '指示要求'
  },
  yaheThicknessTolerance: {
    label: '压合总厚度公差误差值',
    code: 'yaheThicknessTolerance',
    labelId: 48,
    groupId: 2,
    groupName: '指示要求'
  },
  productThickness: {
    label: '成品总厚度公差',
    code: 'productThickness',
    labelId: 50,
    groupId: 2,
    groupName: '指示要求'
  },
  productThicknessTolerance: {
    label: '成品总厚度公差误差值',
    code: 'productThicknessTolerance',
    labelId: 52,
    groupId: 2,
    groupName: '指示要求'
  },

  materialType: {
    label: '资料/物料类型',
    code: 'materialType',
    labelId: 54,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  feilinNum: {
    label: '菲林加工图数量',
    code: 'feilinNum',
    labelId: 56,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  changeNum: {
    label: '更改图数量',
    code: 'changeNum',
    labelId: 58,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  clientBoardNum: {
    label: '客供板材数量',
    code: 'clientBoardNum',
    labelId: 60,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  circuitOuter: {
    label: '外层线路',
    code: 'circuitOuter',
    labelId: 62,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  circuitInner: {
    label: '内层线路',
    code: 'circuitInner',
    labelId: 64,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  zuhan: {
    label: '阻焊',
    code: 'zuhan',
    labelId: 66,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  character: {
    label: '字符',
    code: 'character',
    labelId: 68,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  zuhanBridge: {
    label: '阻焊桥',
    code: 'zuhanBridge',
    labelId: 70,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  tanyouBridge: {
    label: '碳油桥',
    code: 'tanyouBridge',
    labelId: 72,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  blueGlue: {
    label: '蓝胶',
    code: 'blueGlue',
    labelId: 74,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  minCircuitWidth: {
    label: '最小线宽',
    code: 'minCircuitWidth',
    labelId: 76,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  minCircuitDistance: {
    label: '最小线距',
    code: 'minCircuitDistance',
    labelId: 78,
    groupId: 4,
    groupName: '客供资料/物料'
  },
  minCircleWidth: {
    label: '最小环宽',
    code: 'minCircleWidth',
    labelId: 80,
    groupId: 4,
    groupName: '客供资料/物料'
  },

  // 工序工艺要求
  projectName: {
    label: '工程',
    code: 'projectName',
    labelId: 82,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zuankong: {
    label: '钻孔',
    code: 'zuankong',
    labelId: 84,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  dianduCopperThickness: {
    label: '铜箔加厚到',
    code: 'dianduCopperThickness',
    labelId: 86,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  dianduMaterial: {
    label: '电镀材料',
    code: 'dianduMaterial',
    labelId: 88,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  dianduChenniejin: {
    label: '电镀沉镍金',
    code: 'dianduChenniejin',
    labelId: 90,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  dianduGuniejin: {
    label: '电镀钴镍金',
    code: 'dianduGuniejin',
    labelId: 92,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  goldenFingerMaterial: {
    label: '金手指材料',
    code: 'goldenFingerMaterial',
    labelId: 94,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  goldenFinger: {
    label: '金手指',
    code: 'goldenFinger',
    labelId: 96,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  goldenLevel: {
    label: '金色等级',
    code: 'goldenLevel',
    labelId: 98,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zuhanMaterial: {
    label: '阻焊材料',
    code: 'zuhanMaterial',
    labelId: 100,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zuhanModel: {
    label: '阻焊型号',
    code: 'zuhanModel',
    labelId: 102,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zuhanColor: {
    label: '颜色',
    code: 'zuhanColor',
    labelId: 104,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zuhanType: {
    label: '单双面',
    code: 'zuhanType',
    labelId: 106,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zuhanSingle: {
    label: '单面备注',
    code: 'zuhanSingle',
    labelId: 108,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  guokongType: {
    label: '过孔工艺',
    code: 'guokongType',
    labelId: 110,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  guokongBga: {
    label: '过孔工艺-其它',
    code: 'guokongBga',
    labelId: 111,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zuhanFlag: {
    label: '阻焊标志',
    code: 'zuhanFlag',
    labelId: 112,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zifuMaterial: {
    label: '字符材料',
    code: 'zifuMaterial',
    labelId: 114,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zifuModel: {
    label: '型号',
    code: 'zifuModel',
    labelId: 116,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zifuColor: {
    label: '颜色',
    code: 'zifuColor',
    labelId: 118,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zifuType: {
    label: '单双面',
    code: 'zifuType',
    labelId: 120,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zifuSingle: {
    label: '单面备注',
    code: 'zifuSingle',
    labelId: 122,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  zifuFlag: {
    label: '标志',
    code: 'zifuFlag',
    labelId: 124,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  blueGlueType: {
    label: '蓝胶型号',
    code: 'blueGlueType',
    labelId: 126,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  chengxing: {
    label: '成形',
    code: 'chengxing',
    labelId: 128,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  pigongModel: {
    label: '啤共用模',
    code: 'pigongModel',
    labelId: 130,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  daojiao: {
    label: '倒角',
    code: 'daojiao',
    labelId: 132,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  testType: {
    label: '测试',
    code: 'testType',
    labelId: 134,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  commonTestCli: {
    label: '共用测试架',
    code: 'commonTestCli',
    labelId: 136,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  packageType: {
    label: '包装类型',
    code: 'packageType',
    labelId: 138,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  xBoard: {
    label: '"X"板',
    code: 'xBoard',
    labelId: 140,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  desiccant: {
    label: '干燥剂',
    code: 'desiccant',
    labelId: 142,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  confirmDoc: {
    label: '提供确认书',
    code: 'confirmDoc',
    labelId: 144,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  checkPoint: {
    label: '验货要求',
    code: 'checkPoint',
    labelId: 146,
    groupId: 6,
    groupName: '工艺工序要求'
  },
  checkOther: {
    label: '其它',
    code: 'checkOther',
    labelId: 148,
    groupId: 6,
    groupName: '工艺工序要求'
  },

  // 备注
  wholeRemark: {
    label: '备注',
    code: 'wholeRemark',
    labelId: 150,
    groupId: 8,
    groupName: '备注'
  },
  follower: {
    label: '跟单文员',
    code: 'follower',
    labelId: 152,
    groupId: 8,
    groupName: '备注'
  },
  followTime: {
    label: '日期',
    code: 'followTime',
    labelId: 154,
    groupId: 8,
    groupName: '备注'
  },
  assistant: {
    label: '业务助理',
    code: 'assistant',
    labelId: 156,
    groupId: 8,
    groupName: '备注'
  },
  assistantTime: {
    label: '日期',
    code: 'assistantTime',
    labelId: 158,
    groupId: 8,
    groupName: '备注'
  },

  // 合同评审
  contractEngManager: {
    label: '经理',
    code: 'contractEngManager',
    labelId: 160,
    groupId: 10,
    groupName: '合同评审'
  },
  contractEngTime: {
    label: '时间',
    code: 'contractEngTime',
    labelId: 162,
    groupId: 10,
    groupName: '合同评审'
  },
  contractEngMaterial: {
    label: '客供资料审核及标准',
    code: 'contractEngMaterial',
    labelId: 164,
    groupId: 10,
    groupName: '合同评审'
  },
  contractEngStandard: {
    label: '加工要求/验货标准',
    code: 'contractEngStandard',
    labelId: 166,
    groupId: 10,
    groupName: '合同评审'
  },
  contractEngAbality: {
    label: '工程技术能力',
    code: 'contractEngAbality',
    labelId: 168,
    groupId: 10,
    groupName: '合同评审'
  },
  contractEngWaixie: {
    label: '外协加工能力',
    code: 'contractEngWaixie',
    labelId: 170,
    groupId: 10,
    groupName: '合同评审'
  },
  contractProManager: {
    label: '经理',
    code: 'contractProManager',
    labelId: 172,
    groupId: 10,
    groupName: '合同评审'
  },
  contractProTime: {
    label: '时间',
    code: 'contractProTime',
    labelId: 174,
    groupId: 10,
    groupName: '合同评审'
  },
  contractProMaterial: {
    label: '物料准备',
    code: 'contractProMaterial',
    labelId: 176,
    groupId: 10,
    groupName: '合同评审'
  },
  contractProStandard: {
    label: '生产能力',
    code: 'contractProStandard',
    labelId: 178,
    groupId: 10,
    groupName: '合同评审'
  },
  contractProControl: {
    label: '过程控制',
    code: 'contractProControl',
    labelId: 180,
    groupId: 10,
    groupName: '合同评审'
  },
  contractProOut: {
    label: '准时交货',
    code: 'contractProOut',
    labelId: 182,
    groupId: 10,
    groupName: '合同评审'
  },

  approvalBy: {
    label: '审批人',
    code: 'approvalBy',
  },
};

const tableData = [
  {
    materialCode: 'A0001',
    materialName: '物料1',
    supplier: 'A供应商',
    num: '60',
  },
  {
    materialCode: 'A0002',
    materialName: '物料2',
    supplier: 'B供应商',
    num: '90',
  },
  {
    materialCode: 'A0003',
    materialName: '物料3',
    supplier: 'C供应商',
    num: '100',
  },
]

const OrderApplyForm = (props, {submitting, dispatch}) => {
  const {visible, onSubmit, formType, oldOrderData} = props;
  const {TextArea} = Input;

  const [form] = Form.useForm();
  const [error, setError] = useState([]);
  const [productType, setProductType] = useState(1); // 是否新增产品
  const [orderStatus, setOrderStatus] = useState(1); // 1 待审批 ；0 草稿
  const [customerData, setCustomerData] = useState([]); // 客户数据
  const [productData, setProductData] = useState([]); // 产品数据
  const [otherBoardSupplierVisible, setBoardSupplierVisible] = useState(false);
  const [materialType, setMaterialType] = useState([]);
  const [dianduMaterial, setDianduMaterial] = useState(null);
  const [zuhanType, setZuhanType] = useState(null);
  const [zifuType, setZifuType] = useState(null);
  const [chengxingType, setChengxingType] = useState([]);
  const [testType, setTestType] = useState(null);
  const [checkPoint, setCheckPoint] = useState(null);
  const [approvalData, setApprovalData] = useState([]);
  const [receiveByData, setReceiveByData] = useState([]);

  useEffect(() => {
    queryCustomer({
      pageNum: 1,
      pageSize: 9999
    }).then(res => {
      setCustomerData(res.result.records)
    })
  }, [])

  useEffect(() => {
    // form.resetFields();
    if (formType > 1) {
      Object.keys(oldOrderData).forEach(key => {
        if (key.indexOf('Time') > -1) {
          //console.log((key, oldOrderData[key])
          oldOrderData[key] = oldOrderData[key] ? moment(oldOrderData[key], 'YYYY-MM-DD') : oldOrderData[key];
        }
      })

      const oldReviewFormDetailData = {};
      Object.keys(fieldLabels).forEach(key => {
        if (fieldLabels[key].groupId) {
          for (const item of oldOrderData.reviewFormDetails) {
            if (item.labelId == fieldLabels[key].labelId) {
              oldReviewFormDetailData[key] = key.indexOf('Time') > -1 ?
                (item.labelOptionValue ? moment(item.labelOptionValue, 'YYYY-MM-DD') : item.labelOptionValue)
                : item.labelOptionValue;
              break;
            }
          }
        }
      })
      form.setFieldsValue({
        ...oldOrderData,
        ...oldReviewFormDetailData
      })
    }

    //console.log((form)
  }, [approvalData])

  useEffect(() => {
    if (formType > 1) {
      setProductType(oldOrderData.productType)
    }
  }, [])

  const onReceiveBySearch = (v) => {
    queryAccount({
      pageNum: 1,
      pageSize: 99999,
      staffName: v
    }).then(res => {
      setReceiveByData(res.result.records)
    })
  }

  useEffect(() => {
    queryAccount({
      pageNum: 1,
      pageSize: 99999
    }).then(res => {
      setReceiveByData(res.result.records)
      setApprovalData(res.result.records)
    })
  }, [])

  const getErrorInfo = (errors) => {
    const errorCount = errors.filter((item) => item.errors.length > 0).length;

    if (!errors || errorCount === 0) {
      return null;
    }

    const scrollToField = (fieldKey) => {
      const labelNode = document.querySelector(`label[for="${fieldKey}"]`);

      if (labelNode) {
        labelNode.scrollIntoView(true);
      }
    };

    const errorList = errors.map((err) => {
      if (!err || err.errors.length === 0) {
        return null;
      }

      const key = err.name[0];
      return (
        <li key={key} className={styles.errorListItem} onClick={() => scrollToField(key)}>
          <CloseCircleOutlined className={styles.errorIcon}/>
          <div className={styles.errorMessage}>{err.errors[0]}</div>
          <div className={styles.errorField}>{fieldLabels[key].label}</div>
        </li>
      );
    });
    return (
      <span className={styles.errorIcon}>
        <Popover
          title="表单校验信息"
          content={errorList}
          overlayClassName={styles.errorPopover}
          trigger="click"
          getPopupContainer={(trigger) => {
            if (trigger && trigger.parentNode) {
              return trigger.parentNode;
            }

            return trigger;
          }}
        >
          <CloseCircleOutlined/>
        </Popover>
        {errorCount}
      </span>
    );
  };

  const onFinish = (values) => {
    //console.log((values)
    const orderData = {
      prdReviewForms: {},
      reviewFormDetails: [],
      productsInfo: {}
    }
    Object.keys(fieldLabels).forEach(key => {
      if (!fieldLabels[key].groupId) {
        orderData[key] = Object.prototype.toString.call(values[key]) === '[object Object]' ? moment(values[key]).format('YYYY-MM-DD HH:mm:ss') : values[key]
      } else {
        if (fieldLabels[key].groupId !== 10) {
          orderData.reviewFormDetails.push({
            productCode: values.productCode,
            labelGroupId: fieldLabels[key].groupId,
            labelGroupName: fieldLabels[key].groupName,
            labelId: fieldLabels[key].labelId,
            labelName: fieldLabels[key].label,
            labelOptionValue: Array.isArray(values[key]) ? values[key].join() :
              (Object.prototype.toString.call(values[key]) === '[object Object]' ? moment(values[key]).format('YYYY-MM-DD HH:mm:ss') : values[key])
          })
        }
      }
    })
    orderData.productsInfo.productCode = values.productCode;
    orderData.productsInfo.custModelNo = values.custModelNo;
    orderData.productsInfo.custId = values.custId;
    orderData.productsInfo.productName = values.productName;
    orderData.productsInfo.pcbLayerNum = values.pcbLayerNum;
    orderData.productsInfo.pcbType = values.pcbType;
    orderData.productsInfo.panelLength = values.panelLength;
    orderData.productsInfo.panelWidth = values.panelWidth;
    orderData.productsInfo.panelPcbNum = values.panelPcbNum;
    orderData.orderStatus = orderStatus
    orderData.productType = orderData.productType ? orderData.productType : 1;
    orderData.contractNo = values.contractNo;


    setError([]);

    onSubmit(orderData)
  };

  const onFinishFailed = (errorInfo) => {
    setError(errorInfo.errorFields);
  };

  const onCustomerChange = (o) => {
    form.setFieldsValue({
      custAddress: o.custAddress
    })
  }

  const onProductTypeChange = (e) => {
    setProductType(e.target.value)
  }

  const onProductSearch = (v) => {
    queryProduct({
      pageNum: 1,
      pageSize: 9999,
      productCode: v,
      productStatus: 1
    }).then(res => {
      setProductData(res.result.records)
    })
  }

  const onProductChange = (v, o) => {
    //console.log((o.product)
    form.setFieldsValue({
      custModelNo: o.product.custModelNo,
      custId: o.product.custId
    })
  }

  const onApprovalSearch = (v) => {
    queryAccount({
      pageNum: 1,
      pageSize: 99999,
      staffName: v
    }).then(res => {
      setApprovalData(res.result.records)
    })
  }

  return (
    <div className={'product-form'}>
      <Form
        form={form}
        layout="vertical"
        initialValues={{
          material: tableData,
        }}
        hideRequiredMark
        onFinish={onFinish}
        onFinishFailed={onFinishFailed}
      >
        <>
          <Card title="订单基础信息" className={styles.card} bordered={false}>
            <Row gutter={50}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.productType.label}
                  name={fieldLabels.productType.code}
                >
                  <Radio.Group disabled={formType > 2} onChange={(e => onProductTypeChange(e))} defaultValue={1}>
                    <Radio value={1}>是</Radio>
                    <Radio value={2}>否</Radio>
                  </Radio.Group>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.orderCode.label}
                  name={fieldLabels.orderCode.code}
                >
                  <Input disabled={formType >= 2}/>
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={50}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.productCode.label}
                  name={fieldLabels.productCode.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  {
                    productType === 1 ?
                      <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.productCode.label}`}/>
                      : <Select disabled={formType > 2} onSearch={(v) => onProductSearch(v)} showSearch
                                onChange={(v, o) => onProductChange(v, o)}>
                        {
                          productData.map(item => {
                            return <Option value={item.productCode} product={item}
                                           key={item.productCode}>{item.productCode}</Option>
                          })
                        }
                      </Select>
                  }
                </Form.Item>
              </Col>
              {/*<Col lg={8} md={12} sm={24}>*/}
              {/*  <Form.Item*/}
              {/*    label={fieldLabels.productName.label}*/}
              {/*    name={fieldLabels.productName.code}*/}
              {/*  >*/}
              {/*    <Input disabled={formType > 2? true: productType === 2} placeholder={`请输入${fieldLabels.productName.label}`}/>*/}
              {/*  </Form.Item>*/}
              {/*</Col>*/}
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.contractNo.label}
                  name={fieldLabels.contractNo.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType > 2}
                         placeholder={`请输入${fieldLabels.contractNo.label}`}/>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.productionNo.label}
                  name={fieldLabels.productionNo.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.productionNo.label}`}/>
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={50}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.orderNum.label}
                  name={fieldLabels.orderNum.code}
                  rules={[
                    {
                      required: true,
                      message: '订货数量是必填项'
                    },
                    {
                      pattern: /^[1-9]\d*$/,
                      message: '只能输入整数'
                    }
                  ]}
                >
                  <InputNumber
                    style={{width: '100%'}}
                    disabled={formType > 2}
                    min={0}
                    placeholder={`请输入${fieldLabels.orderNum.label}`}
                  />
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.orderPrice.label}
                  name={fieldLabels.orderPrice.code}
                  rules={[
                    {
                      required: true,
                      message: '订单金额是必填项'
                    },
                    {
                      pattern: /^\d+(\.\d{0,2})?$/,
                      message: '只能输入两位小数'
                    }
                  ]}
                >
                  <InputNumber
                    style={{width: '100%'}}
                    disabled={formType > 2}
                    min={0}
                    placeholder={`请输入${fieldLabels.orderPrice.label}`}
                  />
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.requirementDeliveryTime.label}
                  name={fieldLabels.requirementDeliveryTime.code}
                >
                  <DatePicker disabled={formType > 2} format="YYYY-MM-DD" style={{width: '100%'}}/>
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={50}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.planDeliveryTime.label}
                  name={fieldLabels.planDeliveryTime.code}
                >
                  <DatePicker disabled={formType > 2} format="YYYY-MM-DD" style={{width: '100%'}}/>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.receivedBy.label}
                  name={fieldLabels.receivedBy.code}
                >
                  <Select
                    showSearch
                    defaultActiveFirstOption={false}
                    filterOption={false}
                    onSearch={(v) => onReceiveBySearch(v)}
                    notFoundContent={null}
                    disabled={formType > 2}>
                    {
                      receiveByData.map(item => {
                        return <Option value={item.userId} key={item.userId}>{item.staffInfo.realName}</Option>
                      })
                    }
                  </Select>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.receivedTime.label}
                  name={fieldLabels.receivedTime.code}
                >
                  <DatePicker disabled={formType > 2} format="YYYY-MM-DD" style={{width: '100%'}}/>
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={50}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custId.label}
                  name={fieldLabels.custId.code}
                >
                  <Select disabled={formType > 2} onChange={(v, o) => onCustomerChange(o)}>
                    {
                      customerData.map(item => {
                        return <Option value={item.custId} key={item.custId}
                                       custAddress={item.custAddress}>{item.custName}</Option>
                      })
                    }
                  </Select>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custAddress.label}
                  name={fieldLabels.custAddress.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={true} placeholder={`请输入${fieldLabels.custAddress.label}`}/>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custContactName.label}
                  name={fieldLabels.custContactName.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.custContactName.label}`}/>
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={50}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custContactPhone.label}
                  name={fieldLabels.custContactPhone.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.custContactPhone.label}`}/>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custContactEmail.label}
                  name={fieldLabels.custContactEmail.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.custContactEmail.label}`}/>
                </Form.Item>
              </Col>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.custModelNo.label}
                  name={fieldLabels.custModelNo.code}
                  rules={[
                    {
                      max: 32,
                      message: '最大长度为32'
                    },
                  ]}
                >
                  <Input disabled={formType > 2 || productType === 2}
                         placeholder={`请输入${fieldLabels.custModelNo.label}`}/>
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={50}>
              <Col lg={8} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.remark.label}
                  name={fieldLabels.remark.code}
                >
                  <TextArea disabled={formType > 2} placeholder={`请输入${fieldLabels.remark.label}`}/>
                </Form.Item>
              </Col>
            </Row>
          </Card>
          <Card title="合同评审信息" bordered={false} style={{display: productType === 2 ? 'none' : ''}}>
            <Card title="一、指示要求">
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.contractNo.label}
                    name={fieldLabels.contractNo.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.contractNo.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.contractProductCode.label}
                    name={fieldLabels.contractProductCode.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.contractProductCode.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.contractClientType.label}
                    name={fieldLabels.contractClientType.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.contractClientType.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.pcbLayerNum.label}
                    name={fieldLabels.pcbLayerNum.code}
                    rules={productType === 1 ? [
                      {
                        pattern: /^[0-9]{1,2}$/,
                        message: '最多输入2位整数'
                      },
                      {
                        required: true,
                        message: `${fieldLabels.pcbLayerNum.label}是必填项`
                      },
                    ] : []}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.pcbLayerNum.label}`}/>
                  </Form.Item>
                </Col>
                {/*<Col lg={8} md={12} sm={24}>*/}
                {/*  <Form.Item*/}
                {/*    label={fieldLabels.unitSize.label}*/}
                {/*    name={fieldLabels.unitSize.code}*/}
                {/*    rules={[*/}
                {/*      {*/}
                {/*        max: 32,*/}
                {/*        message: '最大长度为32'*/}
                {/*      },*/}
                {/*    ]}*/}
                {/*  >*/}
                {/*    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.unitSize.label}`}/>*/}
                {/*  </Form.Item>*/}
                {/*</Col>*/}
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.panelLength.label}
                    name={fieldLabels.panelLength.code}
                    rules={productType === 1 ? [
                      {
                        pattern: /^0\.([1-9]|\d[1-9])$|^[1-9]\d{0,8}\.\d{0,2}$|^[1-9]\d{0,8}$/,
                        message: '只能输入2位小数和8位整数'
                      },
                      {
                        required: true,
                        message: `${fieldLabels.panelLength.label}是必填项`
                      },
                    ]: []}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.panelLength.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.panelWidth.label}
                    name={fieldLabels.panelWidth.code}
                    rules={productType === 1 ? [
                      {
                        pattern: /^0\.([1-9]|\d[1-9])$|^[1-9]\d{0,8}\.\d{0,2}$|^[1-9]\d{0,8}$/,
                        message: '只能输入2位小数和8位整数'
                      },
                      {
                        required: true,
                        message: `${fieldLabels.panelWidth.label}是必填项`
                      },
                    ]: []}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.panelWidth.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.panelPcbNum.label}
                    name={fieldLabels.panelPcbNum.code}
                    rules={productType === 1 ? [
                      {
                        pattern: /^[0-9]{1,11}$/,
                        message: '最多输入11位整数'
                      },
                      {
                        required: true,
                        message: `${fieldLabels.panelPcbNum.label}是必填项`
                      },
                    ]: []}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.panelPcbNum.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.orderNum.label}
                    name={fieldLabels.orderNum.code}
                    rules={productType === 1 ? [
                      {
                        required: true,
                        message: '订货数量是必填项'
                      },
                      {
                        pattern: /^[1-9]\d*$/,
                        message: '只能输入整数'
                      }
                    ]: []}
                  >
                    <InputNumber
                      style={{width: '100%'}}
                      disabled={formType > 2}
                      min={0}
                      placeholder={`请输入${fieldLabels.orderNum.label}`}
                    />
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={16} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.orderType.label}
                    name={fieldLabels.orderType.code}
                  >
                    <Checkbox.Group style={{width: '100%'}} disabled={formType > 2}>
                      <Checkbox value="1">新单</Checkbox>
                      <Checkbox value="2">返单</Checkbox>
                      <Checkbox value="3">特急单</Checkbox>
                      <Checkbox value="4">重要客户</Checkbox>
                      <Checkbox value="5">新开发客户</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.pcbType.label}
                    name={fieldLabels.pcbType.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.pcbType.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.boardSupplier.label}
                    name={fieldLabels.boardSupplier.code}
                  >
                    <Radio.Group disabled={formType > 2} style={{width: '100%'}} onChange={(e) => {
                      if (e.target.value === '5') {
                        setBoardSupplierVisible(true)
                      } else {
                        setBoardSupplierVisible(false)
                      }
                    }}>
                      <Radio value="1">建滔</Radio>
                      <Radio value="2">生益</Radio>
                      <Radio value="3">国际</Radio>
                      <Radio value="4">边料</Radio>
                      <Radio value="5">其他</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item style={{display: otherBoardSupplierVisible ? 'block' : 'none'}}
                             label={fieldLabels.otherBoardSupplier.label}
                             name={fieldLabels.otherBoardSupplier.code}
                             rules={[
                               {
                                 max: 32,
                                 message: '最大长度为32'
                               },
                             ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.otherBoardSupplier.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.boardColor.label}
                    name={fieldLabels.boardColor.code}
                  >
                    <Radio.Group disabled={formType > 2} style={{width: '100%'}}>
                      <Radio value="1">白料</Radio>
                      <Radio value="2">黄料</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.redCopper.label}
                    name={fieldLabels.redCopper.code}
                  >
                    <Radio.Group disabled={formType > 2} style={{width: '100%'}}>
                      <Radio value="1">是</Radio>
                      <Radio value="2">否</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.highFrequencyBoard.label}
                    name={fieldLabels.highFrequencyBoard.code}
                  >
                    <Radio.Group disabled={formType > 2} style={{width: '100%'}}>
                      <Radio value="1">是</Radio>
                      <Radio value="2">否</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.dielectricConstant.label}
                    name={fieldLabels.dielectricConstant.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.dielectricConstant.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.boardThicknessInner.label}
                    name={fieldLabels.boardThicknessInner.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.boardThicknessInner.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.boardThicknessOuter.label}
                    name={fieldLabels.boardThicknessOuter.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.boardThicknessOuter.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.copperThicknessInner.label}
                    name={fieldLabels.copperThicknessInner.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.copperThicknessInner.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.copperThicknessOuter.label}
                    name={fieldLabels.copperThicknessOuter.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.copperThicknessOuter.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.yaheThickness.label}
                    name={fieldLabels.yaheThickness.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.yaheThickness.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.yaheThicknessTolerance.label}
                    name={fieldLabels.yaheThicknessTolerance.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.yaheThicknessTolerance.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.productThickness.label}
                    name={fieldLabels.productThickness.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.productThickness.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.productThicknessTolerance.label}
                    name={fieldLabels.productThicknessTolerance.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.productThicknessTolerance.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </Card>
            <Card style={{marginTop: '20px'}} title={'二、客供资料/物料'}>
              <Row gutter={50}>
                <Col lg={24} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.materialType.label}
                    name={fieldLabels.materialType.code}
                  >
                    <Checkbox.Group disabled={formType > 2} style={{width: '100%'}} onChange={(val) => {
                      setMaterialType(val)
                    }}>
                      <Checkbox value={'1'}>Email文件</Checkbox>
                      <Checkbox value={'2'}>软盘样品</Checkbox>
                      <Checkbox value={'3'}>菲林加工图</Checkbox>
                      <Checkbox value={'4'}>更改图</Checkbox>
                      <Checkbox value={'5'}>模具</Checkbox>
                      <Checkbox value={'6'}>测试架</Checkbox>
                      <Checkbox value={'7'}>客供板材</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24} style={{display: materialType.indexOf('3') > -1 ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.feilinNum.label}
                    name={fieldLabels.feilinNum.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.feilinNum.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24} style={{display: materialType.indexOf('4') > -1 ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.changeNum.label}
                    name={fieldLabels.changeNum.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.changeNum.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24} style={{display: materialType.indexOf('7') > -`` ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.clientBoardNum.label}
                    name={fieldLabels.clientBoardNum.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.clientBoardNum.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.circuitOuter.label}
                    name={fieldLabels.circuitOuter.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.circuitOuter.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.circuitInner.label}
                    name={fieldLabels.circuitInner.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.circuitInner.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuhan.label}
                    name={fieldLabels.zuhan.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zuhan.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.character.label}
                    name={fieldLabels.character.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.character.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuhanBridge.label}
                    name={fieldLabels.zuhanBridge.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zuhanBridge.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.tanyouBridge.label}
                    name={fieldLabels.tanyouBridge.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.tanyouBridge.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.blueGlue.label}
                    name={fieldLabels.blueGlue.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.blueGlue.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.minCircuitWidth.label}
                    name={fieldLabels.minCircuitWidth.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.minCircuitWidth.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.minCircuitDistance.label}
                    name={fieldLabels.minCircuitDistance.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.minCircuitDistance.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.minCircleWidth.label}
                    name={fieldLabels.minCircleWidth.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.minCircleWidth.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </Card>
            <Card style={{marginTop: '20px'}} title={'三、工艺工序要求'}>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.projectName.label}
                    name={fieldLabels.projectName.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.projectName.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">钻孔</Divider>
              <Row gutter={50}>
                <Col lg={24} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuankong.label}
                    name={fieldLabels.zuankong.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>表面不能打磨</Radio>
                      <Radio value={'2'}>沉铜后二钻/铣</Radio>
                      <Radio value={'3'}>蚀刻后二钻/铣</Radio>
                      <Radio value={'4'}>成型前二钻</Radio>
                      <Radio value={'5'}>见附图</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">电镀</Divider>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.dianduCopperThickness.label}
                    name={fieldLabels.dianduCopperThickness.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.dianduCopperThickness.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={16} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.dianduMaterial.label}
                    name={fieldLabels.dianduMaterial.code}
                  >
                    <Radio.Group disabled={formType > 2} style={{width: '100%'}} onChange={(e) => {
                      setDianduMaterial(e.target.value)
                    }}>
                      <Radio value={'1'}>哑镍</Radio>
                      <Radio value={'2'}>光镍</Radio>
                      <Radio value={'3'}>哑镍金</Radio>
                      <Radio value={'4'}>光镍金</Radio>
                      <Radio value={'5'}>沉镍金</Radio>
                      <Radio value={'6'}>钴镍金</Radio>
                      <Radio value={'7'}>光铜面松香</Radio>
                      <Radio value={'8'}>镀锡</Radio>
                      <Radio value={'9'}>喷锡</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}></Col>
                <Col lg={8} md={24} sm={24} style={{display: dianduMaterial === '5' ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.dianduChenniejin.label}
                    name={fieldLabels.dianduChenniejin.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.dianduChenniejin.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24} style={{display: dianduMaterial === '6' ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.dianduGuniejin.label}
                    name={fieldLabels.dianduGuniejin.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.dianduGuniejin.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.goldenFingerMaterial.label}
                    name={fieldLabels.goldenFingerMaterial.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>金手指/喷锡</Radio>
                      <Radio value={'2'}>金手指水金</Radio>
                      <Radio value={'3'}>金手指钴金</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.goldenFinger.label}
                    name={fieldLabels.goldenFinger.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.goldenFinger.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.goldenLevel.label}
                    name={fieldLabels.goldenLevel.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.goldenLevel.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">阻焊</Divider>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuhanMaterial.label}
                    name={fieldLabels.zuhanMaterial.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>感光油</Radio>
                      <Radio value={'2'}>焗油</Radio>
                      <Radio value={'3'}>UV油</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuhanModel.label}
                    name={fieldLabels.zuhanModel.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zuhanModel.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuhanColor.label}
                    name={fieldLabels.zuhanColor.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zuhanColor.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuhanType.label}
                    name={fieldLabels.zuhanType.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Radio.Group disabled={formType > 2} onChange={(e) => {
                      setZuhanType(e.target.value)
                    }}>
                      <Radio value={'1'}>单面</Radio>
                      <Radio value={'2'}>双面</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24} style={{display: zuhanType === '1' ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.zuhanSingle.label}
                    name={fieldLabels.zuhanSingle.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zuhanSingle.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.guokongType.label}
                    name={fieldLabels.guokongType.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>过孔盖油</Radio>
                      <Radio value={'2'}>过孔塞油</Radio>
                      <Radio value={'3'}>BGA塞油</Radio>
                      <Radio value={'4'}>其它</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={16} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zuhanFlag.label}
                    name={fieldLabels.zuhanFlag.code}
                  >
                    <Checkbox.Group disabled={formType > 2}>
                      {/*            <Checkbox value={'1'}>BGA塞油</Checkbox>*/}
                      <Checkbox value={'2'}>生产周期</Checkbox>
                      <Checkbox value={'3'}>UL标志</Checkbox>
                      <Checkbox value={'4'}>阻燃等级</Checkbox>
                      <Checkbox value={'5'}>静电标志</Checkbox>
                      <Checkbox value={'6'}>公司标志</Checkbox>
                      <Checkbox value={'7'}>客户公司标志</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">字符</Divider>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zifuMaterial.label}
                    name={fieldLabels.zifuMaterial.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>感光油</Radio>
                      <Radio value={'2'}>焗油</Radio>
                      <Radio value={'3'}>UV油</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zifuModel.label}
                    name={fieldLabels.zifuModel.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zifuModel.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zifuColor.label}
                    name={fieldLabels.zifuColor.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zifuColor.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zifuType.label}
                    name={fieldLabels.zifuType.code}
                  >
                    <Radio.Group disabled={formType > 2} onChange={(e) => {
                      setZifuType(e.target.value)
                    }}>
                      <Radio value={'1'}>单面</Radio>
                      <Radio value={'2'}>双面</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24} style={{display: zifuType === '1' ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.zifuSingle.label}
                    name={fieldLabels.zifuSingle.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.zifuSingle.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={16} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.zifuFlag.label}
                    name={fieldLabels.zifuFlag.code}
                  >
                    <Checkbox.Group disabled={formType > 2}>
                      <Checkbox value={'2'}>生产周期</Checkbox>
                      <Checkbox value={'3'}>UL标志</Checkbox>
                      <Checkbox value={'4'}>阻燃等级</Checkbox>
                      <Checkbox value={'5'}>静电标志</Checkbox>
                      <Checkbox value={'6'}>公司标志</Checkbox>
                      <Checkbox value={'7'}>客户公司标志</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.blueGlueType.label}
                    name={fieldLabels.blueGlueType.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.blueGlueType.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">成形</Divider>
              <Row gutter={50}>
                <Col lg={24} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.chengxing.label}
                    name={fieldLabels.chengxing.code}
                  >
                    <Checkbox.Group disabled={formType > 2} onChange={(val) => {
                      setChengxingType(val)
                    }}>
                      <Checkbox value={'1'}>切</Checkbox>
                      <Checkbox value={'2'}>电铣</Checkbox>
                      <Checkbox value={'3'}>靠模铣</Checkbox>
                      <Checkbox value={'4'}>V-CUT</Checkbox>
                      <Checkbox value={'5'}>啤共用模</Checkbox>
                      <Checkbox value={'6'}>新开模</Checkbox>
                      <Checkbox value={'7'}>冲后铣边</Checkbox>
                      <Checkbox value={'8'}>倒角</Checkbox>
                    </Checkbox.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={8} md={24} sm={24} style={{display: chengxingType.indexOf('5') > -1 ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.pigongModel.label}
                    name={fieldLabels.pigongModel.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.pigongModel.label}`}/>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24} style={{display: chengxingType.indexOf('8') > -1 ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.daojiao.label}
                    name={fieldLabels.daojiao.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.daojiao.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">测试</Divider>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.testType.label}
                    name={fieldLabels.testType.code}
                  >
                    <Radio.Group disabled={formType > 2} onChange={(e) => {
                      setTestType(e.target.value)
                    }}>
                      <Radio value={'1'}>针床测试</Radio>
                      <Radio value={'2'}>飞针测试</Radio>
                      <Radio value={'3'}>开测试架</Radio>
                      <Radio value={'4'}>共用测试架</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24} style={{display: testType === '4' ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.commonTestCli.label}
                    name={fieldLabels.commonTestCli.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.commonTestCli.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">包装</Divider>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.packageType.label}
                    name={fieldLabels.packageType.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>普通包装</Radio>
                      <Radio value={'2'}>真空包装</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.xBoard.label}
                    name={fieldLabels.xBoard.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>{'"X"板报废'}</Radio>
                      <Radio value={'2'}>{'"X"板另装'}</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.desiccant.label}
                    name={fieldLabels.desiccant.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>是</Radio>
                      <Radio value={'2'}>否</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">确认书</Divider>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.confirmDoc.label}
                    name={fieldLabels.confirmDoc.code}
                  >
                    <Radio.Group disabled={formType > 2}>
                      <Radio value={'1'}>是</Radio>
                      <Radio value={'2'}>否</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
              <Divider orientation="left">验货要求</Divider>
              <Row gutter={50}>
                <Col lg={8} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.checkPoint.label}
                    name={fieldLabels.checkPoint.code}
                  >
                    <Radio.Group disabled={formType > 2} onChange={(e) => {
                      setCheckPoint(e.target.value)
                    }}>
                      <Radio value={'1'}>客标</Radio>
                      <Radio value={'2'}>国际</Radio>
                      <Radio value={'3'}>厂标</Radio>
                      <Radio value={'4'}>其它</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <Col lg={8} md={24} sm={24} style={{display: checkPoint === '4' ? 'block' : 'none'}}>
                  <Form.Item
                    label={fieldLabels.checkOther.label}
                    name={fieldLabels.checkOther.code}
                    rules={[
                      {
                        max: 32,
                        message: '最大长度为32'
                      },
                    ]}
                  >
                    <Input disabled={formType > 2} placeholder={`请输入${fieldLabels.checkOther.label}`}/>
                  </Form.Item>
                </Col>
              </Row>
            </Card>
            <Card style={{marginTop: '20px'}} title={'四、备注'}>
              <Row gutter={50}>
                <Col lg={24} md={24} sm={24}>
                  <Form.Item
                    label={fieldLabels.wholeRemark.label}
                    name={fieldLabels.wholeRemark.code}
                  >
                    <TextArea disabled={formType > 2} placeholder={`请输入${fieldLabels.wholeRemark.label}`}></TextArea>
                  </Form.Item>
                </Col>
              </Row>
              <Row gutter={50}>
                <Col lg={6} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.follower.label}
                    name={fieldLabels.follower.code}
                  >
                    {/*<Input disabled={formType > 2} placeholder={`请输入${fieldLabels.follower.label}`}/>*/}
                    <Select
                      showArrow={true}
                      disabled={formType > 2}
                    >
                      {
                        approvalData.map(item => {
                          return <Option value={item.staffInfo.realName}
                                         key={item.userId}>{item.staffInfo.realName}</Option>
                        })
                      }
                    </Select>
                  </Form.Item>
                </Col>
                <Col lg={6} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.followTime.label}
                    name={fieldLabels.followTime.code}
                  >
                    <DatePicker disabled={formType > 2} format="YYYY-MM-DD" style={{width: '100%'}}/>
                  </Form.Item>
                </Col>
                <Col lg={6} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.assistant.label}
                    name={fieldLabels.assistant.code}
                  >
                    <Select
                      showArrow={true}
                      disabled={formType > 2}
                    >
                      {
                        approvalData.map(item => {
                          return <Option value={item.staffInfo.realName}
                                         key={item.userId}>{item.staffInfo.realName}</Option>
                        })
                      }
                    </Select>
                  </Form.Item>
                </Col>
                <Col lg={6} md={12} sm={24}>
                  <Form.Item
                    label={fieldLabels.assistantTime.label}
                    name={fieldLabels.assistantTime.code}
                  >
                    <DatePicker disabled={formType > 2} format="YYYY-MM-DD" style={{width: '100%'}}/>
                  </Form.Item>
                </Col>
              </Row>
            </Card>
          </Card>
          <Card title="审批信息" style={{marginTop: '20px'}} className={styles.card} bordered={false}>
            <Row gutter={50}>
              <Col lg={6} md={12} sm={24}>
                <Form.Item
                  label={fieldLabels.approvalBy.label}
                  name={fieldLabels.approvalBy.code}
                  rules={[
                    {
                      required: true,
                      message: '请选择审批人'
                    },
                  ]}
                >
                  {/*<Input disabled={formType > 2} placeholder={`请输入${fieldLabels.approvalBy.label}`}/>*/}
                  <Select
                    showSearch
                    defaultActiveFirstOption={false}
                    showArrow={false}
                    filterOption={false}
                    onSearch={(v) => onApprovalSearch(v)}
                    notFoundContent={null}
                    disabled={formType > 2}
                  >
                    {
                      approvalData.map(item => {
                        return <Option value={item.userId} key={item.userId}>{item.staffInfo.realName}</Option>
                      })
                    }
                  </Select>
                </Form.Item>
              </Col>
            </Row>
          </Card>
        </>
        <FooterToolbar>
          {getErrorInfo(error)}
          <Button type="primary" onClick={() => {
            setOrderStatus(1)
            form?.submit()
          }} loading={submitting} style={{display: formType < 3 ? '' : 'none'}}>
            保存并提交
          </Button>
          <Button onClick={() => {
            setOrderStatus(0)
            form?.submit()
          }} loading={submitting} style={{display: formType < 3 ? '' : 'none'}}>
            存为草稿
          </Button>
          <Button onClick={props.onCancel.bind(this, false)}>
            返回
          </Button>
        </FooterToolbar>
      </Form>
    </div>
  );
};

// export default connect(({ loading }) => ({
//   submitting: loading.effects['productForm/submitAdvancedForm'],
// }))(ProductForm);
export default OrderApplyForm;
